package com.orafl.use.comorafluse.factoryBean;

import com.orafl.use.comorafluse.interfaceExt.Config;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class factoryMain {
    public static void main(String[] args) throws Exception {
        //不具有任何演示效果。  FactoryBean 主要功能是 对第三方的实体进行 获取修改增强
        AnnotationConfigApplicationContext ann = new AnnotationConfigApplicationContext(factory.class);
        // 获取 FactoryBean 定义
        Object obj = ann.getBeanFactory().getBean("factory");
        // 获取 FactoryBean 本身
        //Object obj = ann.getBeanFactory().getBean("&factory");


        System.out.println(obj);
    }
}
